{% extends "base.html" %}
{% block title %}类别添加{% endblock %}
{% block content %}
<form  style="width:900px; margin: 10px auto 0; " method="post" action="/phone/category">
<fieldset style="float: left; width:400px; clear:none">
<legend>新增类别</legend>
<ul style="list-style:none;">
<li>
<label>类别名称：</label>
<input type="text" name="name" /></li>
<li><label>父类别：</label>
<select name="pid"><option value="0">根类别</option>
{% recurse category in cats children="children" indent=(0,20) %}
<option style="padding-left:{{indent}}px;" value="{{category.key.id}}">{{category.name}}</option>
{% yield %}
{% endrecurse %}
</select>
</li>
<li><label>类别描述：</label>
<textarea name="desc"></textarea></li>
<li style="text-align:right"><input type="submit"  value="新增"/></li>
<input type="hidden" value="{{action}}" name="action"/>
</ul>
</fieldset>
</form>
{% endblock %}
